﻿<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>数据统计-<%=gAppTitle%></title>
    <link rel="shortcut icon" href="/images/favicon.png">
    <link rel='stylesheet' href='/stylesheets/bootstrap.min.css' />
    <style type="text/css">
    	div{
    		/*border:1px solid red;*/
    	}
    </style>
  </head>
  <body>
	
	<div class="container">		
<% if (user) { %> 

	<div class="text-right">
		<a href="/list" class="btn btn-default">详情</a>
		<a href="/record" class="btn btn-default">记账</a>
	</div>
	<table class="table table-striped table-bordered table-condensed"> 
		<caption><h3 class="text-info">记账信息详情</h3></caption>
		<thead>
			<tr>
				<th style="width:8em;" class="text-right">科目</th>
				<th>金额(元)</th>
				<th>记录数</th>
			</tr>	
		</thead>
		<tbody>
		<%
			results.forEach(function(result, index) { 
		%> 
			<tr>
				<td class="text-right"><%= result.consumeSubject %></td> 
				<td><%= result.amount %></td> 
				<td><%= result.count %></td> 
			</tr>
		<%}) %> 
		</tbody>
	</table>
<% } %> 
</div>

	<script type="text/javascript" src='/javascripts/jquery-1.11.0.min.js'></script>
	<script type="text/javascript" src='/javascripts/bootstrap.min.js'></script>

 </body>
</html>